
//
//  UIButton+Extension.swift
//  01-照片选择器
//
//  Created by 唐万超 on 15/8/10.
//  Copyright © 2015年 唐万超. All rights reserved.
//

import UIKit

extension UIButton {
    
    convenience init(imageName: String){
        
        self.init()
        setImage(imageName)
    }
    
    func setImage(imageName: String){
        setImage(UIImage(named: imageName), forState: UIControlState.Normal)
        
        setImage(UIImage(named: imageName + "_highlighted"), forState: UIControlState.Highlighted)
        
    }
    
}
